/*
 * 文 件 名 : Plan.java
 * 版    权 : China Machi.Co.,Ltd.Copyright 2009-2011.All rights reserved
 * 描    述 : <描述>
 * 修 改 人 : wangchd
 * 修改时间 : 2013-1-21
 * 跟踪单号 : <跟踪单号>
 * 修改单号 : <修改单号>
 * 修改内容 : <修改内容>
 */
package com.fire8.dolphin.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <一句话功能简介><br>
 * <功能详细描述>
 *
 * @author  wangchd
 * @version [版本号,2013-1-21]
 * @see     [相关类/方法]
 * @since   [产品/模块]
 */
public class Plan
{
    
    public static final Integer FINISH_NO=0;
    public static final Integer FINISH_YES=1;
    
    /**不提醒**/
    public static final Integer ALARM_NO=0;
    /**提醒**/
    public static final Integer ALARM_YES=1;
    
    /**数据类型 0：分类标题**/
    public static final Integer DATA_TYPE_TITLE=0;
    
    /**数据类型 1：不是分类标题，正常计划**/
    public static final Integer DATA_TYPE_PLAN=1;
    
    /**
     * 本表ID
     */
    private long pLocalId;
    
    /**
     * 服务器ID
     */
    private long sRemoteId;
    private String title;
    private String alarmTime;
    private String DateTime;
    
   // private Date alarmTime;//提醒时间
    private int alarm;//是否提醒[0：不提醒；1：提醒]
    private int finish;//是否完成[0：未完成；1：完成]
    private int isPublic;//是否公开[0：公开；1：私密]
    private Integer userId;//所属用户
    
    private String userName;//用户名，从服务器端传过来的
    
    private int dataType;//数据类型，列表显示用[0：标题，1：正常计划]
    
    private ArrayList<Date> alarmList;//提醒时间列表，客户端上传时用到，当同一件事需要多天完成时
   
    //表名
    public static final String TABLE_NAME="t_plan";
    
    //列名
    public static final String C_LOCAL_ID="local_id";
    public static final String C_REMOTE_ID="remote_id";
    public static final String C_TITLE="title";
    public static final String C_ALARM_TIME="alarmTime";
    public static final String C_DATE_TIME="date_time";
    public static final String C_ALARM="alarm";
    public static final String C_FINISH="finish";
    public static final String C_IS_PUBLIC="isPublic";
    public static final String C_USER_ID="userId";
    
    
    public static final String CREATE_TABLE= new StringBuffer("CREATE TABLE ")
    .append(TABLE_NAME)
    .append("(")
    .append(C_LOCAL_ID).append(" Integer primary key autoincrement")//id
    .append(",").append(C_REMOTE_ID).append(" Integer ")//服务器上的ID
    .append(",").append(C_TITLE)
    .append(",").append(C_ALARM_TIME)
    .append(",").append(C_DATE_TIME)
    .append(",").append(C_ALARM).append(" Integer ")
    .append(",").append(C_FINISH).append(" Integer ")
    .append(",").append(C_IS_PUBLIC).append(" Integer ")
    .append(",").append(C_USER_ID).append(" Integer ")
    .append(")")
    .toString();
    
    
    
    public int getAlarm()
    {
        return alarm;
    }
    public void setAlarm(int alarm)
    {
        this.alarm = alarm;
    }
    public int getFinish()
    {
        return finish;
    }
    public void setFinish(int finish)
    {
        this.finish = finish;
    }
    public int getIsPublic()
    {
        return isPublic;
    }
    public void setIsPublic(int isPublic)
    {
        this.isPublic = isPublic;
    }
    public Integer getUserId()
    {
        return userId;
    }
    public void setUserId(Integer userId)
    {
        this.userId = userId;
    }
    public long getpLocalId()
    {
        return pLocalId;
    }
    public void setpLocalId(long pLocalId)
    {
        this.pLocalId = pLocalId;
    }
    public long getsRemoteId()
    {
        return sRemoteId;
    }
    public void setsRemoteId(long sRemoteId)
    {
        this.sRemoteId = sRemoteId;
    }
    public String getTitle()
    {
        return title;
    }
    public void setTitle(String title)
    {
        this.title = title;
    }
   
    public String getAlarmTime()
    {
        return alarmTime;
    }
    public void setAlarmTime(String alarmTime)
    {
        this.alarmTime = alarmTime;
    }
    public String getDateTime()
    {
        return DateTime;
    }
    public void setDateTime(String dateTime)
    {
        DateTime = dateTime;
    }
    public ArrayList<Date> getAlarmList()
    {
        return alarmList;
    }
    public void setAlarmList(ArrayList<Date> alarmList)
    {
        this.alarmList = alarmList;
    }
    public int getDataType()
    {
        return dataType;
    }
    public void setDataType(int dataType)
    {
        this.dataType = dataType;
    }
    public String getUserName()
    {
        return userName;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }
    
   
}
